Skip to content

[ENG-3771] projects-cli-1: default project UX#677

Closed
mrmoxon wants to merge 1 commit into
projects-cli-0from
feature/projects-cli
Closed

[ENG-3771] projects-cli-1: default project UX#677
mrmoxon wants to merge 1 commit into
projects-cli-0from
feature/projects-cli

Conversation

@mrmoxon

@mrmoxon mrmoxon commented May 20, 2026

Copy link
Copy Markdown

Summary

  • stack on [ENG-3771] projects-cli-0: explicit projects CLI #730 and add the behavior-changing project defaults
  • make prime lab setup create, select, or bind an active Lab project unless --no-project is passed
  • have train/eval creation paths use the active project by default, while prime eval push --eval-id avoids implicit reassignment
  • update README guidance for the default-project workflow

Review notes

This PR intentionally contains only the default UX layer on top of #730. The explicit projects CLI, API clients, assignment commands, and explicit --project plumbing live in #730.

Validation

  • uv run pytest packages/prime/tests/test_rl_config.py packages/prime/tests/test_lab_setup.py packages/prime/tests/test_eval_push.py packages/prime/tests/test_hosted_eval.py packages/prime/tests/test_projects_cli.py packages/prime/tests/test_rl_api.py packages/prime/tests/test_deployments.py packages/prime-evals/tests/test_evals.py -q
  • uv run ruff check packages/prime/src/prime_cli/commands/rl.py packages/prime/src/prime_cli/lab_setup.py packages/prime/src/prime_cli/commands/evals.py packages/prime/src/prime_cli/utils/eval_push.py packages/prime/src/prime_cli/verifiers_bridge.py packages/prime/tests/test_lab_setup.py packages/prime/tests/test_eval_push.py packages/prime/tests/test_hosted_eval.py

Note

Medium Risk
Changes default project attachment for new training runs and evaluations; users who relied on no project must use --no-project or project clear, but eval-id push avoids silent reassignment.

Overview
Default Lab project UX so authenticated workspaces get an active project without a separate prime project create step, and new train/eval artifacts attach to it unless opted out.

prime lab setup now runs project setup via _ensure_setup_project: when logged in it creates a project named from the workspace folder (or reuses the matching slug), honors --project / --project-name, and skips with --no-project. It respects a workspace that previously ran prime project clear (stored as a cleared flag in context instead of deleting context).

Train and eval paths resolve the active workspace project by default (resolve_project_id(..., use_active_project=True) on prime train, prime eval run, and most prime eval push flows). prime eval push --eval-id does not implicitly attach the active project, avoiding accidental reassignment on updates. Post-run hub upload defaults to using the active project as well.

README and CLI help text document --no-project and the setup flags.

Reviewed by Cursor Bugbot for commit 4be6370. Bugbot is set up for automated code reviews on this repo. Configure here.

@mrmoxon mrmoxon changed the title [codex] add lab project commands ENG-3771: add lab project commands May 28, 2026
@mrmoxon mrmoxon force-pushed the feature/projects-cli branch 3 times, most recently from ac843d0 to dbe9200 Compare May 30, 2026 09:16
@mrmoxon mrmoxon marked this pull request as ready for review May 30, 2026 09:24
@willccbb

willccbb commented May 30, 2026

Copy link
Copy Markdown
Member

@mrmoxon thoughts on folding this into the setup flow? ie default = single project that shares name with workspace folder, overridable + switchable. a bit worried about abstraction creep, feels like we can have these coupled until users explicitly want to decouple

@mrmoxon

mrmoxon commented May 30, 2026

Copy link
Copy Markdown
Author

@mrmoxon thoughts on folding this into the setup flow? ie default = single project that shares name with workspace folder, overridable + switchable. a bit worried about abstraction creep, feels like we can have these coupled until users explicitly want to decouple

Defo agree, am making the lab setup flow more subtle with next commit. Want to minimise user knowledge gradients. Thanks for the suggestion.

@mrmoxon

mrmoxon commented May 30, 2026

Copy link
Copy Markdown
Author

Addressed the setup-flow point: prime lab setup now creates an active default project named after the workspace folder when authenticated, with --project to bind an existing project, --project-name to override the generated name, and --no-project for local-only setup. Setup still succeeds without auth/API availability and prints the follow-up project command path.

Comment thread packages/prime/src/prime_cli/lab_setup.py
Comment thread packages/prime/src/prime_cli/lab_setup.py Outdated
Comment thread packages/prime/src/prime_cli/commands/evals.py Outdated
Comment thread packages/prime/src/prime_cli/lab_setup.py Outdated
@mrmoxon mrmoxon force-pushed the feature/projects-cli branch from 530dca9 to 38348e9 Compare June 1, 2026 18:27
@mrmoxon

mrmoxon commented Jun 1, 2026

Copy link
Copy Markdown
Author

Rebased onto latest main and addressed the latest Bugbot cleanup by removing the redundant pre-create scope guard. The PR is mergeable again locally/GitHub-side; CI has restarted on head 38348e9. Local validation after the rebase: uv run pytest packages/prime/tests packages/prime-evals/tests -q => 804 passed, 5 skipped; focused project/setup/eval suite, ruff check/format, ty, and git diff --check also passed.

Comment thread packages/prime/src/prime_cli/commands/evals.py
@mrmoxon mrmoxon force-pushed the feature/projects-cli branch from 38348e9 to db89b50 Compare June 4, 2026 11:14
Comment thread packages/prime/src/prime_cli/utils/projects.py Outdated
Comment thread packages/prime/src/prime_cli/commands/projects.py
Comment thread packages/prime/src/prime_cli/lab_setup.py Outdated
Comment thread packages/prime/src/prime_cli/lab_setup.py Outdated
Comment thread packages/prime/src/prime_cli/lab_setup.py
Comment thread packages/prime/src/prime_cli/lab_setup.py Outdated
Comment thread packages/prime/src/prime_cli/utils/projects.py
Comment thread packages/prime/src/prime_cli/commands/evals.py
@mrmoxon mrmoxon force-pushed the feature/projects-cli branch from a70e00e to 1c9b467 Compare June 8, 2026 12:04
@mrmoxon mrmoxon changed the title ENG-3771: add lab project commands ENG-3771: add default project UX Jun 8, 2026
@mrmoxon mrmoxon changed the base branch from main to feature/projects-cli-explicit June 8, 2026 12:04
@mrmoxon mrmoxon force-pushed the feature/projects-cli-explicit branch from 62608b7 to 6d0e97c Compare June 8, 2026 12:05
@mrmoxon mrmoxon force-pushed the feature/projects-cli branch from 1c9b467 to 3be9bd9 Compare June 8, 2026 12:06
@mrmoxon mrmoxon changed the title ENG-3771: add default project UX projects-cli-1: default project UX Jun 8, 2026
@mrmoxon mrmoxon force-pushed the feature/projects-cli-explicit branch from 6d0e97c to 65d3769 Compare June 8, 2026 12:16
@mrmoxon mrmoxon force-pushed the feature/projects-cli branch from 3be9bd9 to 4560fd8 Compare June 8, 2026 12:17

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4560fd8. Configure here.

Comment thread packages/prime/src/prime_cli/lab_setup.py
@mrmoxon mrmoxon force-pushed the feature/projects-cli branch from 4560fd8 to 514b736 Compare June 8, 2026 12:24
@mrmoxon mrmoxon force-pushed the feature/projects-cli branch from 514b736 to 4be6370 Compare June 8, 2026 12:30
@mrmoxon mrmoxon closed this Jun 8, 2026
@mrmoxon mrmoxon deleted the feature/projects-cli branch June 8, 2026 12:30
@mrmoxon mrmoxon changed the title projects-cli-1: default project UX [ENG-3771] projects-cli-1: default project UX Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants